namespace Plugins.Engine
{
    using System;
    using System.Diagnostics.CodeAnalysis;
    using Plugins.Interfaces;

    [Serializable]
    public class PluginPropertyConverter<T> : PluginPropertyConverter, IPluginPropertyConverter<T>
    {
        [SuppressMessage("Microsoft.Design", "CA1000")]
        [SuppressMessage("Microsoft.Usage", "CA2211")]
        [SuppressMessage("Microsoft.Security", "CA2104")]
        public static readonly IPluginPropertyConverter<T> Default = new PluginPropertyConverter<T>();

        public virtual T ConvertFromString(string value)
        {
            return PluginPropertyConverter.ConvertFromString<T>(value);
        }

        public virtual string ConvertToString(T value)
        {
            return PluginPropertyConverter.ConvertToString<T>(value);
        }
    }
}

